<%-- 
    Document   : productDetail
    Created on : Apr 21, 2013, 6:04:34 PM
    Author     : TNT
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <%@page import="RMI.Client" %>
    </head>
    <body bgcolor="#CCFFFF">
        
  <table width="1024" border="0" align =center cellSpacing=0 cellPadding=0 bgcolor='white' height="768">
  <tr>
      <td colspan="5"><div align="center"><a href ="index.jsp"> <img src ="image/laptops_banner.jpg" width ="1024px" height="150" ></a></div></td>
  </tr>
  <tr>
    <td colspan="5"><%@include file="menu_ngang.jsp" %></td>
  </tr>
  <tr>
     <td width="150" vAlign=top bgcolor ="silver" ><div align ="center"><%@include file="menu_doc.jsp" %></div></td>
    <td width="4">&nbsp;</td>
    <td width="720" vAlign=top >
        <table width ="100%"  height ="100%" border="0">
            <%
                String ID = request.getParameter("ID");
                Client client = new Client();
                boolean connect = client.Connect();
                if(connect ==false)
                out.print("<h1 align = center ><img src = 'image/sorry.jpg'> <br>Không kết nối được cơ sở dữ liệu </h1>");
                else{
                
                String Prd[]= client.getProductDetail(ID);
                String path = "<img src="+Prd[3]+" width=100% heigth=100% >";
                out.println("<tr>");
			out.println("<td width=50% height=20% align=center>"+path+"<br><font color=red>"+Prd[2]+" đ</font><br>"+Prd[5]+"</td>");
			out.println("<td width=50% align=center bgcolor=#C8DBDE>");
			out.println("<font color=#FF6700 size='5'>"+Prd[0]+"</font><br>Hãng sản xuất: "+Prd[1]+"<br>");
			out.println("<form action=addtocart.jsp method=get>");
			out.println("<input type=hidden value='"+ID+"'"+" name=ID>");
			out.println("<input type=submit value='Thêm vào giỏ hàng'><br>");
			out.println("</form><br>");
			out.println("<form action=cart.jsp>");
			out.println("<input type=submit action=index.jsp value='Xem giỏ hàng'>");
			out.println("</form>");
			out.println("</td>");
			out.println("</tr>");
			out.println("<tr><td valign='top' align='left' bgcolor=#C8DBDE colspan=2>Thông tin cấu hình<br><br>"+Prd[4]+"</td></tr>");
                }
            %>
        </table>
    </td>
    <td width="2">&nbsp;</td>
    <td width="150" vAlign=top ><%@include file="Right.jsp" %></td>
  </tr>
  <tr>
      <td colspan="5"><%@include file="bottom.jsp" %></td>
  </tr>
</table>
</body>
</html>
